
package com.joysuch.wwyt.bp.service;

import com.joysuch.wwyt.bp.BpSystemVideoSearchBean;
import com.joysuch.wwyt.bp.bean.BpSystemVideoAddBean;
import com.joysuch.wwyt.bp.entity.BpSystemVideo;
import com.joysuch.wwyt.core.common.ajax.ResultBean;
import com.joysuch.wwyt.core.exception.ApiBusinessException;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;

import javax.servlet.http.HttpServletRequest;
import java.util.Date;
import java.util.List;

public interface BpSystemVideoService {

    Page<BpSystemVideoAddBean> list(Pageable page, BpSystemVideoSearchBean condition);

    void add(BpSystemVideoAddBean bpSystemVideo);

    void update(BpSystemVideoAddBean bpSystemVideo);

    void delete(Long id);

    BpSystemVideoAddBean getByid(Long id) throws ApiBusinessException;

    /**
     * 查询设备的数量
     * @param flag 0 : 所有数量 1: 拥有位置的数量
     * @return
     */
    Long getNumForHaveLocation(Integer flag);

    /**
     * 查询所有有位置的视频
     * @return
     */
    List<BpSystemVideo> findAllHaveLocation();

    ResultBean openStream(Long id, HttpServletRequest request) throws ApiBusinessException;

    ResultBean openHistoryStream(Long id, Date startTime, Date endTime, HttpServletRequest request) throws ApiBusinessException;
    
}
